package com.lz.undertow.common.constant;

import java.io.File;
import java.util.Arrays;
import java.util.List;

/**
 * 功能说明：数据字典常量类
 * 编写作者：yubt
 * 开发日期：2021-11-2 14:24:00
 * 修改记录：修改日期   修改人    修改内容
 *
 * @author yubt
 */
public class DictConstant {

    public static final String DEFAULT_VALUE = "*";
    public static final String COMMA = ",";
    public static final String COLON = ":";
    public static final Integer LEN = 1024;
    public static final String DOT = ".";
    public static final String D_DOT = "..";
    public static final String HTTP = "http://";
    public static final String PORT = "port";
    public static final String WSDL = "wsdl";
    public static final String QUESTION = "?";
    public static final String DOC_PATH = "document";
    public static final String IP = "ip";
    public static final String SYS_ID = "sysId";
    public static final String SYS_IDS = "sysIds";
    public static final String PP_ID = "ppId";
    public static final String PP_IDS = "ppIds";
    public static final String ID = "id";

    public static final String LOG_PATH = "/Common/Log/";
    public static final String BASE_PATH = System.getProperty("user.dir");
    public static final String FICC_PATH = System.getProperty("user.dir") + File.separator + "ficc";
    public static final String PRICING_PATH = "/xpp-server/target";
    public static final String TEMP_LOG_PATH = "log";

    public static final String DLL_PATH_X = "/axis2c-1.6.0/services/";

    public static final String TEMP = "/temp";

    public static final String HORIZONTAL_BAR = "_";
    public static final String MINUS = "-";
    public static final String SLASHES = "/";
    public static final String D_BLACK_SLASHES = "\\";
    public static final String HIS = "H";
    public static final String NOW = "N";
    public static final String INNER = "inner";
    public static final String THIRD_TYPE = "thirdType";

    /**
     * 接口枚举
     */
    public interface TYPE {
        /**
         * 0
         */
        String PRICING = "pricing";
        String PP_SERVER = "pp";
        String OTHER = "other";
    }
    public interface SUB_TYPE {
        /**
         * 0
         */
        String PP = "pp";
        String FRONT = "front";
        String BACK = "back";
    }

    /**
     * 接口枚举
     */
    public interface INF {
        /**
         * 0
         */
        String otcFxOption = "otcOption/calcFxMarket.action";
        String MONITOR_PATH = "/monitor/systemMonitor.action";
        String CHECK = "/check";
    }

    /**
     * 字符串枚举
     */
    public static interface str {

        String customPricingParam = "customPricingParam";
        String isPeriod = "IsPeriod";
        String CUSTOM_LEGS = "customLegs";
        String productType = "productType";
        String calendar = "CALENDAR";
        String customOption = "CustomOption";
        String dscRateInc = "DscRateInc";
        String fundingRateInc = "FundingRateInc";
        String volRateInc = "VolRateInc";
        String elnAcb = "ELN_ACB";
        String autocallable = "Autocallable";
        String math = "math";
        String chars = "char";
        String NULL = "NULL";
        String yes = "yes";
        String procedure = "procedure";
        String xpp = "xpp";
        String calc = "calc";
        String gridSize = "GridSize";
        String mcPathNum = "MCPathNum";
        String PS = "PS";
        String keyValuesTail = "</KeyValues>";
        String keyValuesHead = "<KeyValues>";
        String xmlHead = "<?xml version=\"1.0\" encoding=\"GB2312\"?><root><Parameter><KeyValues>";
        String xmlTail = "</KeyValues></Parameter></root>";
    }

    /**
     * 数字枚举
     */
    public static interface num {
        /**
         * 0
         */
        public static final String ZERO = "0";

        public static final String ONE = "1";

        public static final String TWO = "2";

        public static final String THREE = "3";

        public static final String FOUR = "4";

        public static final String FIVE = "5";

        public static final String SIX = "6";

        public static final String SEVEN = "7";

        public static final String NIGHT = "8";

        public static final String NINE = "9";

    }

    /**
     * 是否
     */
    public static interface YES_NO {
        /**
         * 是
         */
        public static final String YES = "1";
        /**
         * 否
         */
        public static final String NO = "0";
    }

    /**
     * 业务编码
     */
    public static interface BUSINESS_CODE {
        public static final String CWQQ = "CWQQDJPZ";

        public static final String LLQQ = "LLQQDJPZ";
    }

    /**
     * 期权类型
     */
    public static interface OPTION_TYPE {
        /**
         * 双鲨
         */
        public static final String DOUBLESHARKFIN = "DOUBLESHARKFIN";
        public static final String ELN_ACB_BASICSNOWBALL = "ELN_ACB_BASICSNOWBALL";
        public static final String ELN_ACB_THIRDBASICSNOWBALL = "ELN_ACB_THIRDBASICSNOWBALL";
        public static final String ELN_ACB_STANDARDSNOWBALL = "ELN_ACB_STANDARDSNOWBALL";

        /**
         * test 双鲨获取定价配置
         */
        String TEST_DOUBLESHARKFIN = "DoubleSharkFin";
    }

    /**
     * 资产类型
     */
    public static interface A_TYPE {
        /**
         * 双鲨
         */
        public static final String SPT_XR = "SPT_XR";
    }

    /**
     * 产品类型
     */
    public static interface PRODUCT_TYPE {
        /**
         * 场外期权
         */
        public static final String OTC_OPTION = "OtcOption";
        /**
         * 外汇期权
         */
        public static final String FX_OTC_OPTION = "FxOtcOption";
        /**
         * 信用违约互换
         */
        public static final String CDS = "CDS";
        /**
         * 信用风险缓释凭证
         */
        public static final String CRMW = "CRMW";
        /**
         * 远期合约
         */
        public static final String FORWARD = "Forward";
        /**
         * 利率期权
         */
        public static final String IR_OPTION = "IrOption";
        /**
         * 利率互换
         */
        public static final String IR_SWAP = "IrSwap";
        /**
         * 收益凭证
         */
        public static final String INCOME_CERTIFICATE = "IncomeCertificate";
        /**
         * 国债期货
         */
        public static final String BOND_FUTURE = "BondFuture";
        /**
         * 债券
         */
        public static final String BOND = "Bond";
        /**
         * 商品掉期
         */
        public static final String CMDT_SWAP = "CommoditySwap";
        /**
         * 商品远期
         */
        public static final String CMDT_FORWARD = "CommodityForward";
        /**
         * 现金借贷
         */
        public static final String IRSTREAMS = "IRStreams";
        /**
         * 利率上线限
         */
        public static final String IRCAPFLOOR = "IRCapFloor";
        /**
         * 组合期权
         */
        public static final String STRATEGY = "STRATEGY";
    }

    /**
     * 校验类型
     */
    public static interface VALID_TYPE {
        /**
         * 定价类型
         */
        public static final String CALC = "calc";
        /**
         * 获取定价参数
         */
        public static final String PRICPARAM = "pricparam";


    }

    public static interface IR_OPTION {
        /**
         * ；利率上下限
         */
        public static final String IRCAPFLOOR = "IRCapFloor";
        /**
         * 利率互换
         */
        public static final String IRSWAPTION = "IRSwaption";


    }

    /**
     * 校验类型
     */
    public static interface PARAM_TYPE {
        /**
         * 定价类型
         */
        public static final String CHINESE = "C";
        /**
         * 获取定价参数
         */
        public static final String ENGLISH = "E";


    }

    public static interface DIR_TYPE {

        public static final String CALC = "CALC";
        public static final String JSFW = "计算服务";

        public static final String COMMON = "Common";

        public static final String APACHE = "Apache2";

        public static final String LIB = "lib";

        public static final String RESOURCES = "resources";

        public static final String DLL = "dll";

        public static final String ZIP = "zip";

        public static final String DIST = "dist";

        public static final String VUE = "vue";
        public static final String SCREEN = "screen";
    }

    /**
     * 必填属性
     */
    public static interface REQUIRED {
        /**
         * 定价类型
         */
        public static final boolean YES = true;
        /**
         * 获取定价参数
         */
        public static final boolean NO = false;

    }

    /**
     * 关联属性
     */
    public static interface RELATIVE {
        /**
         * 定价类型
         */
        public static final boolean YES = true;
        /**
         * 获取定价参数
         */
        public static final boolean NO = false;

    }

    /**
     * Excel 类型
     */

    public static interface ChineseTitle {

        public static final String 交易编号 = "交易编号";
        public static final String 期权类型 = "期权类型";
        public static final String 报价方式 = "报价方式";
        public static final String 名义本金 = "名义本金";
        public static final String 名义本金币种 = "名义本金币种";
        public static final String 起始日 = "起始日";
        public static final String 起始日调整 = "起始日调整";
        public static final String 到期日 = "到期日";
        public static final String 到期日调整 = "到期日调整";
        public static final String 定盘日 = "定盘日";
        public static final String 结算日 = "结算日";
        public static final String 买卖方向 = "买卖方向";
        public static final String 参与率 = "参与率";
        public static final String 挂钩标的 = "挂钩标的";
        public static final String 初始价格 = "初始价格";
        public static final String 交易日历 = "交易日历";
        public static final String 行权方式 = "行权方式";
        public static final String 行权参与率 = "行权参与率";
        public static final String 观察开始日 = "观察开始日";
        public static final String 观察结束日 = "观察结束日";
        public static final String 计息起始日 = "计息起始日";
        public static final String 计息终止日 = "计息终止日";
        public static final String 观察类型 = "观察类型";
        public static final String 观察方式 = "观察方式";
        public static final String 定盘类型 = "定盘类型";
        public static final String 看涨看跌 = "看涨看跌";
        public static final String 价差类型 = "价差类型";
        public static final String 低行权价 = "低行权价";
        public static final String 高行权价 = "高行权价";
        public static final String 行权价 = "行权价";
        public static final String 收益率 = "收益率(%)";
        public static final String 结算偏移 = "结算偏移";
        public static final String 计息基准 = "计息基准";
        public static final String 期权是否年化 = "期权是否年化";
        public static final String 后端期权费率 = "后端期权费率";
        public static final String 后端期权费是否年化 = "后端期权费是否年化";
        public static final String 障碍方向 = "障碍方向";
        public static final String 障碍比例 = "障碍比例";
        public static final String 障碍比例1 = "障碍比例1";
        public static final String 补偿收益率1 = "补偿收益率1";
        public static final String 障碍比例2 = "障碍比例2";
        public static final String 补偿收益率2 = "补偿收益率2";
        public static final String 补偿参与率 = "补偿参与率";
        public static final String 最低收益率 = "最低收益率";
        public static final String 支付时机 = "支付时机";
        public static final String 敲出参与率 = "敲出参与率";
        public static final String 敲出方向 = "敲出方向";
        public static final String 敲出票息 = "敲出票息";
        public static final String 敲出票息是否年化 = "敲出票息是否年化";
        public static final String 敲出障碍比例 = "敲出障碍比例";
        public static final String 敲出边界是否包含 = "敲出边界是否包含";
        public static final String 敲入障碍比例 = "敲入障碍比例";
        public static final String 敲入参与率 = "敲入参与率";
        public static final String 敲入票息 = "敲入票息";
        public static final String 敲入票息是否年化 = "敲入票息是否年化";
        public static final String 敲入边界是否包含 = "敲入边界是否包含";
        public static final String 敲入起始日 = "敲入起始日";
        public static final String 敲入结束日 = "敲入结束日";
        public static final String 未触发参与率 = "未触发参与率";
        public static final String 未触发收益率 = "未触发收益率";
        public static final String 未触发收益是否年化 = "未触发收益是否年化";
        public static final String 返息参与率 = "返息参与率";
        public static final String 返息收益率 = "返息收益率";
        public static final String 返息收益参与率 = "返息收益参与率";
        public static final String 返息收益是否年化 = "返息收益是否年化";
        public static final String 定价环境 = "定价环境";
        public static final String 计算日期 = "计算日期";
        public static final String 计算组件 = "计算组件";
        public static final String 贴现率 = "贴现率";
        public static final String 贴现率计息基准 = "贴现率计息基准";
        public static final String 融资率 = "融资率";
        public static final String 融资率计息基准 = "融资率计息基准";
        public static final String 波动率 = "波动率";
        public static final String 波动率计息基准 = "波动率计息基准";
        public static final String 红利率 = "红利率";
        public static final String 红利率计息基准 = "红利率计息基准";

        public static final String 标的价格 = "标的价格";
        public static final String 价格类型 = "价格类型";
        public static final String 计价货币利率 = "计价货币利率";
        public static final String 计价货币利率计息基准 = "计价货币利率计息基准";
        public static final String 基准货币利率 = "基准货币利率";
        public static final String 基准货币利率计息基准 = "基准货币利率计息基准";
        public static final String 标的汇率波动率 = "标的汇率波动率";
        public static final String 标的汇率波动率计息基准 = "标的汇率波动率计息基准";
        public static final String Quanto汇率波动率 = "Quanto汇率波动率";
        public static final String Quanto汇率波动率计息基准 = "Quanto汇率波动率计息基准";
        public static final String 相关系数 = "相关系数";
        public static final String 波动率序列 = "波动率序列(%)";
        public static final String Quanto类型 = "Quanto类型";
        public static final String 触碰收益率 = "触碰收益率";

        /**
         * 非quanto类场外期权条款映射
         *
         * @return
         */
        public static List<String> getExcelTitleList() {
            String[] arry = {交易编号, 期权类型, 报价方式, 名义本金, 起始日, 起始日调整, 到期日, 到期日调整, 定盘日, 结算日, 买卖方向, 参与率, 挂钩标的, 初始价格, 交易日历, 行权方式, 观察类型, 观察开始日, 观察结束日, 观察方式, 定盘类型, 看涨看跌, 价差类型, 低行权价, 高行权价, 行权价, 收益率, 结算偏移, 计息起始日, 计息终止日, 计息基准, 期权是否年化, 后端期权费率, 障碍方向,触碰收益率, 障碍比例, 障碍比例1, 补偿收益率1, 障碍比例2, 补偿收益率2, 补偿参与率, 最低收益率, 支付时机, 敲出参与率, 敲出方向, 敲出票息, 敲出票息是否年化, 敲出障碍比例, 敲出边界是否包含, 敲入障碍比例, 敲入参与率, 敲入票息, 敲入票息是否年化, 敲入边界是否包含, 敲入起始日, 敲入结束日, 未触发参与率, 未触发收益率, 未触发收益是否年化, 返息参与率, 返息收益率, 返息收益参与率, 返息收益是否年化, 后端期权费是否年化, 后端期权费率, 定价环境, 计算日期, 标的价格, 计算组件, 贴现率, 贴现率计息基准, 融资率, 融资率计息基准, 红利率, 红利率计息基准, 波动率, 波动率计息基准, Quanto汇率波动率, Quanto汇率波动率计息基准, 相关系数, Quanto类型};
            return Arrays.asList(arry);
        }

    }

    /**
     * 服务类型
     */
    public static interface SERVER_TYPE {
        /**
         * 计算服务
         */
        public static final String CALC = "calcService";
        /**
         * 定价平台
         */
        public static final String PRICING = "pricing";
    }

    /**
     * 程序类型
     */
    public static interface PLAT_TYPE {
        /**
         * 计算服务
         */
        public static final String FRONT = "frontEnd";
        /**
         * 定价平台
         */
        public static final String BACK = "backEnd";

        public static final String CALC_SERVICE = "calcService";

    }

    /**
     * 是否
     */
    public static interface BIZ_RIGHT {
        /**
         * 无权限
         */
        public static final String NO = "0";
        /**
         * 读权限
         */
        public static final String READ = "1";
        /**
         * 写权限
         */
        public static final String WRITE = "2";
    }

    /**
     * EnglishTitle 类型
     */

    public static interface EnglishTitle {

        public static final String excelId = "excelId";
        public static final String productType = "productType";
        public static final String priceType = "priceType";
        public static final String notional = "notional";
        public static final String effectiveDate = "effectiveDate";
        public static final String effectiveDateConv = "effectiveDateConv";
        public static final String terminationDate = "terminationDate";
        public static final String terminationDateConv = "terminationDateConv";
        public static final String fixingDate = "fixingDate";
        public static final String payDirection = "payDirection";
        public static final String participationRate = "participationRate";
        public static final String instrumentId = "instrumentId";
        public static final String initPrice = "initPrice";
        public static final String calendar = "calendar";
        public static final String exerciseType = "exerciseType";
        public static final String exerciseParticipationRate = "exerciseParticipationRate";
        public static final String obsType = "obsType";
        public static final String exerciseBegDate = "exerciseBegDate";
        public static final String exerciseEndDate = "exerciseEndDate";
        public static final String calcPeriodBegDate = "calcPeriodBegDate";
        public static final String calcPeriodEndDate = "calcPeriodEndDate";
        public static final String obsFrequency = "obsFrequency";
        public static final String fixedType = "fixedType";
        public static final String optionType = "optionType";
        public static final String spreadType = "spreadType";
        public static final String lowStrike = "lowStrike";
        public static final String highStrike = "highStrike";
        public static final String strike = "strike";
        public static final String paymentAmountPecentage = "paymentAmountPecentage";
        public static final String settlementDateOffset = "settlementDateOffset";
        public static final String dayCounter = "dayCounter";
        public static final String optionIsAnnual = "optionIsAnnual";
        public static final String knockType = "knockType";
        public static final String triggerRate1 = "triggerRate1";
        public static final String reBateRate1 = "reBateRate1";
        public static final String triggerRate2 = "triggerRate2";
        public static final String reBateRate2 = "reBateRate2";
        public static final String reBateParticipationRate = "reBateParticipationRate";
        public static final String miniRate = "miniRate";
        public static final String payStyle = "payStyle";
        public static final String knockOutParticipationRate = "knockOutParticipationRate";
        public static final String knockOutBasicYield = "knockOutBasicYield";
        public static final String knockOutBasicYieldIsAnnual = "knockOutBasicYieldIsAnnual";
        public static final String knockOutTriggerRate = "knockOutTriggerRate";
        public static final String isKnockInclude = "isKnockInclude";
        public static final String knockInTriggerRate = "knockInTriggerRate";
        public static final String knockInParticipationRate = "knockInParticipationRate";
        public static final String knockInBasicYield = "knockInBasicYield";
        public static final String knockInBasicYieldIsAnnual = "knockInBasicYieldIsAnnual";
        public static final String isKnockInInclude = "isKnockInInclude";
        public static final String knockInBegDate = "knockInBegDate";
        public static final String knockInEndDate = "knockInEndDate";
        public static final String unTriggerParticipationRate = "unTriggerParticipationRate";
        public static final String unTriggerRate = "unTriggerRate";
        public static final String unTriggerIsAnnual = "unTriggerIsAnnual";
        public static final String minimumParticipationRate = "minimumParticipationRate";
        public static final String minimumRate = "minimumRate";
        public static final String minimumIsAnnual = "minimumIsAnnual";
        public static final String backPremiumPercent = "backPremiumPercent";
        public static final String backPremiumIsAnnual = "backPremiumIsAnnual";

        public static final String cfgId = "cfgId";
        public static final String valueDate = "valueDate";
        public static final String calcPpCode = "calcPpCode";
        public static final String disValue = "disValue";
        public static final String disDaycounter = "disDaycounter";
        public static final String divValue = "divValue";
        public static final String divDaycounter = "divDaycounter";
        public static final String volValue = "volValue";
        public static final String volDaycounter = "volDaycounter";
        public static final String spotPrice = "spotPrice";


        public static final String fxVolValue = "fxVolValue";
        public static final String fxVolDaycounter = "fxVolDaycounter";
        public static final String fxCorr = "fxCorr";
        public static final String calcVol = "calcVol";

        public static List<String> getExcelTitleList() {
            String[] arry = {excelId, productType, priceType, notional, effectiveDate, effectiveDateConv, terminationDate, terminationDateConv, fixingDate, payDirection, participationRate, instrumentId, initPrice, calendar, exerciseType, obsType, exerciseBegDate, exerciseEndDate, obsFrequency, fixedType, optionType, spreadType, lowStrike, highStrike, strike, paymentAmountPecentage, settlementDateOffset, calcPeriodBegDate, calcPeriodEndDate, dayCounter, optionIsAnnual, knockType, triggerRate1, reBateRate1, triggerRate2, reBateRate2, reBateParticipationRate, miniRate, payStyle, knockOutParticipationRate, knockOutBasicYield, knockOutBasicYieldIsAnnual, knockOutTriggerRate, isKnockInclude, knockInTriggerRate, knockInParticipationRate, knockInBasicYield, knockInBasicYieldIsAnnual, isKnockInInclude, knockInBegDate, knockInEndDate, unTriggerParticipationRate, unTriggerRate, unTriggerIsAnnual, minimumParticipationRate, minimumRate, minimumIsAnnual, backPremiumIsAnnual, backPremiumPercent, cfgId, valueDate, spotPrice, calcPpCode, disValue, disDaycounter, divValue, divDaycounter, volValue, volDaycounter, fxVolValue, fxVolDaycounter, fxCorr, calcVol,};
            return Arrays.asList(arry);
        }

    }

}



